package main

import (
	"fmt"
	"unsafe"
)

func goStruct() {
	testStruct()
}

type Struct struct {
	str string
	i   int
}

func (s Struct) method() {
	fmt.Println(s)
	fmt.Println(s.str)
	fmt.Println(s.i)
}

func (s *Struct) change(str string, i int) {
	s.str = str
	s.i = i
}

func testStruct() {

	s := Struct{
		str: "str",
		i:   10,
	}
	fmt.Println(s)
	fmt.Println(s.i)

	p := &s
	fmt.Println(p.i)

	fmt.Println(unsafe.Sizeof(s))

	s.method()
}
